<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body {
            height: 2000px;
        }
        img {
            position: absolute;
            width: 100px;
            height: 100px;
        }
    </style>
    <script src="js/common.js">
    </script>
</head>
<body>
    <img src="image/mm.png" alt="" >
    <script>
        var img = document.querySelector("img");
        document.onmousemove = function(e) {
            img.style.left = evt.getPageX(e)+'px';
            img.style.top = evt.getPageY(e)+ 'px';
        }
    </script>
</body>
</html>